// JavaScript Document

function browserRedirect(goUrl) {  
    
    var sUserAgent= navigator.userAgent.toLowerCase();  
        
    var bIsIpad= sUserAgent.match(/ipad/i) == "ipad";  
        
    var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os";  
        
    var bIsMidp= sUserAgent.match(/midp/i) == "midp";  
        
    var bIsUc7= sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";  
        
    var bIsUc= sUserAgent.match(/ucweb/i) == "ucweb";  
        
    var bIsAndroid= sUserAgent.match(/android/i) == "android";  
        
    var bIsCE= sUserAgent.match(/windows ce/i) == "windows ce";  
       var Requesturl = new Object();Requesturl = GetRequest();
    var wapurl=Requesturl ['wap'];
    
    var bIsWM= sUserAgent.match(/windows mobile/i) == "windows mobile";  
    if ( wapurl != 1 && (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {  
      window.location.href= goUrl;    
    } 
    }  
    
    function GetRequest() { 
       var url = location.search; 
       var theRequest = new Object(); 
       if (url.indexOf("?") != -1) { 
          var str = url.substr(1); 
          strs = str.split("&"); 
          for(var i = 0; i < strs.length; i ++) { 
             theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]); 
          } 
       } 
       return theRequest; 
    } 